Skip to content

fix: add pointer-events none to Card-Link pseudo-element to fix click#569

Open
hamzax180 wants to merge 1 commit into
firstcontributions:mainfrom
hamzax180:fix-button-click-issue
Open

fix: add pointer-events none to Card-Link pseudo-element to fix click#569
hamzax180 wants to merge 1 commit into
firstcontributions:mainfrom
hamzax180:fix-button-click-issue

Conversation

@hamzax180
Copy link
Copy Markdown

Bug Fix: "Go to Project" button not clickable

Problem

The "Go to Project" button on project cards was unresponsive to clicks on hover. Users couldn't navigate to project pages by clicking the button.

Root Cause

The .Card-Link::before CSS pseudo-element creates a gradient overlay on hover, but it was missing pointer-events: none. This caused the overlay to sit on top of the <a> link and intercept all click events.

Fix

Added pointer-events: none to .Card-Link::before in ProjectCard.astro so clicks pass through the overlay to the actual link underneath.

Testing

Verified locally on the Astro dev server — buttons are now fully clickable and correctly navigate to project URLs.

@Sean-Kenneth-Doherty
Copy link
Copy Markdown

I tested this locally. The one-line CSS change builds, but it looks like only a partial workaround for #535.

Checks run:

  • git diff --check main...HEAD passes
  • pnpm build passes
  • inspected built dist/index.html for anchor structure

The added pointer-events: none on .Card-Link::before may help if the pseudo-element is intercepting clicks, but the generated HTML still has nested anchors: the whole card is an <a class="Card-Real-Link">, and IssueList renders issue <a class="Issue-Card"> links inside it. My built-page check found max anchor depth 2 with 9 nested issue anchors.

So this does not fully fix the invalid/fragile markup behind the cards with open issues. A complete fix should avoid wrapping the issue links inside the project link, while keeping the “Go to Project” CTA as the project URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants